<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
    <style>
        a{
            margin: 0 auto;
        }
       #arr{
           display:block;
           text-align: center;
           width: 300px;
           height: 40px;
           line-height:40px;
           background: orange;
           color: white;
           border-radius: 2px;
           box-shadow: 0 5px 0 0 lightgrey;
       }
        .disable {
            background: #d6d6d6 !important;
            color: #999 !important;
        }
    </style>
</head>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>晋级奖励</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="./activity.html" class="iconfont back"></a>
    </header>

    <div data-v-3cbfc35c="" class="activityMian main" s="[object Object]">
        <div data-v-3cbfc35c="" class="activiTop">
            <img data-v-3cbfc35c="" alt="" width="100%" src="/style/images/20160920055547341112.png">
            <input type="hidden" value="{$id}" id="uid">
            <div data-v-3cbfc35c="" class="rewardStatus">
                <em data-v-3cbfc35c="" class="e1">当前等级：
                    <i data-v-3cbfc35c="">
                        <input type="text" id="dengji1" value="<?php if($arr['level']==''){echo '未登录';}else{echo 'VIP'.$arr['level'];};?>" style="border: hidden;color: orangered;width: 60px" readonly></i>
                </em>
                <em data-v-3cbfc35c="" class="e2">晋级奖励：
                    <i data-v-3cbfc35c="">
                        <input type="text"  value=" <?php if($arr['level']=='1'){echo '0.00';}
                        elseif($arr['level']=='2'){echo '1.00';}
                        elseif($arr['level']=='3'){echo '6.00';}
                        elseif($arr['level']=='4'){echo '16.00';}
                        elseif($arr['level']=='5'){echo '74.00';}
                        elseif($arr['level']=='6'){echo '392.00';}
                        elseif($arr['level']=='7'){echo '2080.00';}
                        elseif($arr['level']=='8'){echo '8968.00';}
                        elseif($arr['level']=='9'){echo '47856.00';}
                         elseif($arr['level']==''){echo '0.00';}
                        ;?>" class="jinji" style="border: hidden;color: orangered;width: 60px" readonly >
                    </i>
                </em>
            </div>
            <div id="cen">
                <a data-v-5be8b080="" href="javascript:;" id="arr" class="<?php if($arr['type']=='1' && $arr['is_lingqu']!='0'){echo 'disable';} ?> dianji" >
                    领取
                </a>
            </div>



        </div>
        <h3 data-v-3cbfc35c="">晋级机制</h3>
        <table data-v-3cbfc35c="">
            <tr data-v-3cbfc35c="">
                <th data-v-3cbfc35c="">等级</th>
                <th data-v-3cbfc35c="">成长积分</th>
                <th data-v-3cbfc35c="">晋级奖励</th>
                <th data-v-3cbfc35c="">跳级奖励</th>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP1</td>
                <td data-v-3cbfc35c="">0</td>
                <td data-v-3cbfc35c="">0</td>
                <td data-v-3cbfc35c="">0</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP2</td>
                <td data-v-3cbfc35c="">10</td>
                <td data-v-3cbfc35c="">1</td>
                <td data-v-3cbfc35c="">1</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP3</td>
                <td data-v-3cbfc35c="">200</td>
                <td data-v-3cbfc35c="">5</td>
                <td data-v-3cbfc35c="">6</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP4</td>
                <td data-v-3cbfc35c="">1000</td>
                <td data-v-3cbfc35c="">10</td>
                <td data-v-3cbfc35c="">16</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP5</td>
                <td data-v-3cbfc35c="">10000</td>
                <td data-v-3cbfc35c="">58</td>
                <td data-v-3cbfc35c="">74</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP6</td>
                <td data-v-3cbfc35c="">50000</td>
                <td data-v-3cbfc35c="">318</td>
                <td data-v-3cbfc35c="">392</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP7</td>
                <td data-v-3cbfc35c="">250000</td>
                <td data-v-3cbfc35c="">1688</td>
                <td data-v-3cbfc35c="">2080</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP8</td>
                <td data-v-3cbfc35c="">1000000</td>
                <td data-v-3cbfc35c="">6888</td>
                <td data-v-3cbfc35c="">8968</td>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">VIP9</td>
                <td data-v-3cbfc35c="">5000000</td>
                <td data-v-3cbfc35c="">38888</td>
                <td data-v-3cbfc35c="">47856</td>
            </tr>
        </table>
        <h3 data-v-3cbfc35c="">活动说明</h3>

        <div data-v-3cbfc35c="" class="wrapExplain">1、会员每晋升一个等级，都能获得奖励，最高可达38888元。<br>
            2、充值1元可获得1成长积分。<br>
            <br>
            例1：奥巴马从VIP1直接晋升到VIP4，他将能获得1+5+10=16元奖励。<br>
            例2：本拉登从VIP2直接晋升到VIP4，他将能获得5+10=15元奖励。
        </div>
    </div>
    <!--弹框 begian-->
    <div id="dengji" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">请登录
                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
    <!--弹框 begian-->
    <div id="ssc1" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">该等级的晋级奖励已经领取</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
    <!--弹框 begian-->
    <div id="lingqu1" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">领取成功
                        <p>
                            金额为：<input type="text"  class="eee" style="border: hidden;color: orangered;width: 60px" readonly>
                        </p>

                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
</div>
</body>
</html>
<script>
    $(".layermbtn").click(function(){
        $(".layermbox").hide();
        window.location.href = "#";
    })


//晋级开始
    var dengji = $("#dengji1").val();
    var jiangjin = $(".jinji").val();

    if(jiangjin == 0.00){
        $(".dianji").addClass("disable");
      }
    //晋级奖励未登录
    if(dengji=='未登录'){
        $(".dianji").addClass("disable");
    }
    //晋级领取
    $(".dianji").click(function () {
        var uid = $("#uid").val();
        if(uid==''){
            $("#dengji").show();
            return false;
        }
        var jiangjin = $(".jinji").val();

        var type = 1;
        if($("#arr").hasClass("disable")){
            $("#ssc1").show();
            return false;
        }else {
            $.ajax({
                type: "POST",
                url: "{:U('Index/upgrade')}",
                data: {'jiangjin': jiangjin, 'type': type},
                success: function (dat) {
                    if(dat==2){
                        $("#ssc1").show();
                        $(".dianji").addClass("disable");
                        return false;
                    }
                    var dat1 = dat;
                    var aaa = parseInt(dat1.substring(0,1));
                    var bbb = parseInt(dat1.substr(1)) + '.00';
                    $(".eee").val(bbb);
                    if (aaa == 1) {
                        $("#lingqu1").show();
                        $(".dianji").addClass("disable");

                    }
                }
            });
        }

    });
//晋级结束



</script>